import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/home/Home'
import Login from '@/components/home/Login'
import Online from '@/components/home/Online'
import UserEdit from '@/components/user/UserEdit'
import UserInfo from '@/components/user/UserInfo'
import UserLog from '@/components/user/UserLog'
import NewAdmin from '@/components/user/NewAdmin'
import GmOperation from '@/components/user/GmOperation'
import UserList from '@/components/user/UserList'
import ResourceUpload from '@/components/res/ResourceUpload'
import ResourceDown from '@/components/res/ResourceDown'
import SystemStatistics from '@/components/statistics/SystemStatistics'
import ServiceChargeStatistics from '@/components/statistics/ServiceChargeStatistics'
import RegisterStatistics from '@/components/statistics/RegisterStatistics'
import TopUpStatistics from '@/components/statistics/TopUpStatistics'
import TopUpDetailStatistics from '@/components/statistics/TopUpDetailStatistics'
import Jdssl from '@/components/scenes/Jdssl'
import Lh from '@/components/scenes/Lh'
import Wzjh from '@/components/scenes/Wzjh'
import Dsf from '@/components/scenes/Dsf'
import Share from '@/components/scenes/Share'
import WelfareCode from '@/components/setting/WelfareCode'
import ShareWard from '@/components/setting/ShareWard'
import NiuNiu from '@/components/scenes/NiuNiu'
import Ebg from '@/components/scenes/Ebg'
import Record from '@/components/record/Record'
import NoticeBoard from '@/components/scenes/NoticeBoard'
import Test from '@/components/home/Test'
import Axios from 'axios'
Axios.defaults.baseURL = 'http://119.23.217.208:8081/'
//Axios.defaults.baseURL = 'http://127.0.0.1:8081/'
Axios.defaults.withCredentials=true;
Vue.use(Router)
export default new Router({
  mode: 'history',
  base:'/lele/',
  routes: [
    {
      path: '*',
      component: Login
    },
    {
      path:'/home',
      component:Home,
      children:[
        {
          path:'/online',
          component:Online,
        },
        {
          path:'/userInfo',
          component:UserInfo
        },
        {
          path:'/userLog',
          component:UserLog
        },
        {
          path:'/gmOperation',
          component:GmOperation
        },
        {
          path:'/userList',
          component:UserList
        },
        {
          path:'/newAdmin',
          component:NewAdmin
        },
        {
          path:'/userEdit',
          component:UserEdit
        },
        {
          path:'/resupload',
          component:ResourceUpload
        },
        {
          path:'/resdown',
          component:ResourceDown
        },
        {
          path:'/systemStatistics',
          component:SystemStatistics
        },
        {
          path:'/serviceChargeStatistics',
          component:ServiceChargeStatistics
        },{
          path:'/registerStatistics',
          component:RegisterStatistics
        },{
          path:'/topUpStatistics',
          component:TopUpStatistics
        },{
          path:'/topUpDetailStatistics',
          component:TopUpDetailStatistics
        },
        {
          path:'/jdssl',
          component:Jdssl
        },{
          path:'/lh',
          component:Lh
        },{
          path:'/wzjh',
          component:Wzjh
        },{
          path:'/niuniu',
          component:NiuNiu
        },{
          path:'/dsf',
          component:Dsf
        },{
          path:'/ebg',
          component:Ebg
        },{
          path:'/record',
          component:Record
        },{
          path:'/noticeboard',
          component:NoticeBoard
        },{
          path:'/share',
          component:Share
        },{
          path:'/welfarecode',
          component:WelfareCode
        },{
          path:'/shareward',
          component:ShareWard
        }
      ],
    },
    {
      path:'/',
      component:Login,
    },
    {
      path:'/login',
      component:Login,
    },
    {
      path:'/test',
      component:Test
    }
  ]
})
